package com.zixuan.sina.utils;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.security.core.parameters.P;
import org.springframework.stereotype.Component;

@Component
public class FtpConstant implements InitializingBean {

    @Value("${ftpConfig.ip}")
    private String ip;
    @Value("${ftpConfig.port}")
    private int port;
    @Value("${ftpConfig.user}")
    private String user;
    @Value("${ftpConfig.password}")
    private String password;
    @Value("${ftpConfig.filePath}")
    private String filePath;
    @Value("${ftpConfig.dnsName}")
    private String dnsName;

    public static String IP;
    public static String USER;
    public static String PASSWORD;
    public static String FILE_PATH;
    public static String DNS_NAME;

    public static  int PORT;
    @Override
    public void afterPropertiesSet() throws Exception {
        IP=ip;
        USER=user;
        PASSWORD=password;
        FILE_PATH=filePath;
        DNS_NAME=dnsName;
        PORT=port;
    }
}
